<!DOCTYPE html>
<html lang="zh-cmn-Hans">
 <head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0" />
  <title>发布车辆</title>
  <link rel="stylesheet" href="plugins/weui/style/weui.css?v=-4e168d7" />
  <link rel="stylesheet" href="plugins/weui/style/example.css?v=-5c436b4" />
  <link rel="stylesheet" href="style/is.css?v=-c53d51b" />
  <link rel="stylesheet" href="style/own.css">
  <style>#request-proxy .dialog-img-code .weui-cell{padding:5px 0}#request-proxy .dialog-img-code .weui-dialog__bd:first-child{padding:0}#request-proxy .dialog-img-code .weui-input{padding-left:10px}#request-proxy .weui-vcode-btn{margin-left:0;width:9rem}</style>
 </head>
 <body ontouchstart="">
  <div class="container" id="container">
   <div class="page js_show" id="request-proxy">
    <div class="page__bd">
     <div class="weui-cells weui-cells_form">
       <div class="label_center">
        发布车辆
       </div>
      <div class="weui-cell">
       <div class="weui-cell__hd">
        <label class="weui-label">真实姓名</label>
       </div>
       <div class="weui-cell__bd">
        <input class="weui-input" name="realname" type="text" />
       </div>
      </div>
      <div class="weui-cell">
       <div class="weui-cell__hd">
        <label class="weui-label">身份证号</label>
       </div>
       <div class="weui-cell__bd">
        <input class="weui-input" name="personalid" type="text" />
       </div>
      </div>
      <div class="weui-cell">
       <div class="weui-cell__hd">
        <label class="weui-label">车牌号</label>
       </div>
       <div class="weui-cell__bd">
        <input class="weui-input" name="wechat-number" type="text" />
       </div>
      </div>
      <div class="weui-cell">
       <div class="weui-cell__hd">
        <label class="weui-label">车架号</label>
       </div>
       <div class="weui-cell__bd">
        <input class="weui-input" name="account" type="text" />
       </div>
      </div>
      <div class="weui-cell weui-cell_vcode">
       <div class="weui-cell__hd">
        <label class="weui-label">证件图片</label>
       </div>
       <div class="blank_zone">
        <span id="tmp-block"/>
       </div>
       <div class="weui-cell__ft">
        <button type="button" class="weui-vcode-btn" name="type">点击上传</button>
       </div>
      </div>
      <div class="weui-cell weui-cell_vcode">
       <div class="weui-cell__hd">
        <label class="weui-label">手机号码</label>
       </div>
       <div class="weui-cell__bd">
        <input class="weui-input" name="mobile" type="text" maxlength="11" />
       </div>
       <div class="weui-cell__ft">
        <button type="button" class="weui-vcode-btn" name="send-sms">获取验证码</button>
       </div>
      </div>
      <div class="weui-cell">
       <div class="weui-cell__hd">
        <label class="weui-label">短信验证</label>
       </div>
       <div class="weui-cell__bd">
        <input class="weui-input" name="sms-code" type="number" />
       </div>
      </div>
     </div>
     <div class="weui-btn-area">
      <a class="weui-btn weui-btn_primary confirm" href="javascript:">确认</a>
     </div>
    </div>
    <div class="js_dialog dialog-img-code" style="display:none">
     <div class="weui-mask"></div>
     <div class="weui-dialog">
      <div class="weui-dialog__bd">
       <div class="weui-cell">
        <div class="weui-cell__bd">
         <input class="weui-input" name="code" type="text" maxlength="4" />
        </div>
        <div class="weui-cell__ft">
         <img class="weui-vcode-img img-code" />
        </div>
       </div>
      </div>
      <div class="weui-dialog__ft">
       <a href="javascript:" class="weui-dialog__btn weui-dialog__btn_primary dialog-confirm">确认</a> 
       <a href="javascript:" class="weui-dialog__btn weui-dialog__btn_default cancel">取消</a>
      </div>
     </div>
    </div>
   </div>
  </div>
  <div class="weui-toptips weui-toptips_warn js_tooltips"></div>
  <script src="plugins/zepto/zepto.min.js?v=-2dd2e0f"></script>
  <script src="plugins/weui/weui.min.js?v=-56b2004"></script>
  <script src="js/is.js?v=-477a0d2"></script>
  <script>var requestProxy = function (e) {
    function n() {
        $(e).find("input[name='code']").val(""), $(e).find(".img-code").attr("src", window.paths.imageCode + "?t=" + (new Date).getTime() + "&key=login")
    }
    return {
        init: function () {
            function i() {
                clearInterval(a), t.html("发送验证码"), u = !0
            }
            $(e).find(".cancel").on("click", function () {
                $(e).find(".dialog-img-code").fadeOut(200)
            }), $(e).find(".img-code").on("click", function () {
                n()
            }), $(e).find("button[name='type']").on("click", function () {
                var n = [{
                    label: "上传驾驶证照片",
                    value: 1
                }, {
                    label: "上传身份证照片",
                    value: 2
                }, {
                    label: "上传行驶证照片",
                    value: 3
                }];
                weui.picker(n, {
                    onChange: function (e) {}, onConfirm: function (i) {
                        $(e).find("a[name='type']").find("div").html(n[i - 1].label), l = n[i - 1].value
                    }
                })
            });
            var a, t = $(e).find('button[name="send-sms"]'),
                o = 120,
                l = 0,
                c = $(e).find("input[name='realname']"),
                f = $(e).find("input[name='wechat-number']"),
                d = $(e).find("input[name='account']"),
                m = $(e).find("input[name='mobile']"),
                r = $(e).find("input[name='sms-code']"),
                s = $(e).find("input[name='code']"),
                u = !0;
            $(e).find(".confirm").on("click", function () {
                if (isTipHide())
                    if (l > 0)
                        if (regs.realname.reg.test(c.val()))
                            if (regs.account.reg.test(f.val()) || 0 === f.val().length)
                                if (regs.account.reg.test(d.val()))
                                    if (regs.mobile.reg.test(m.val())) {
                                        var n = {
                                            game_type: l,
                                            realname: c.val(),
                                            wechat_number: f.val(),
                                            account: d.val(),
                                            mobile: m.val(),
                                            code: r.val()
                                        };
                                        openLoading(e), $post(paths.requestProxy, n, function (e) {
                                            dialog("提交成功,进入审核状态！<br/>默认登录密码:888888")
                                        })
                                    } else tip(regs.mobile.msg);
                else tip("账号" + regs.account.msg);
                else tip("微信号" + regs.account.msg);
                else tip(regs.realname.msg);
                else tip("请选择游戏类型")
            }), t.on("click", function () {
                u && (regs.mobile.reg.test(m.val()) ? (n(), $(e).find(".dialog-img-code").fadeIn(200)) : tip(regs.mobile.msg))
            }), $(e).find(".dialog-confirm").on("click", function () {
                if (isTipHide()) {
                    u = !1, openLoading(e);
                    var l = {
                        code: s.val(),
                        mobile: m.val()
                    };
                    $post(paths.sms, l, function (n) {
                        $(e).find(".dialog-img-code").fadeOut(200), t.html(o), a = setInterval(function () {
                            --o <= 0 ? (o = 120, i()) : t.html(o)
                        }, 1e3)
                    }, function (i) {
                        u = !0, tip(i.message), "000010" === i.code ? $(e).find(".dialog-img-code").fadeOut(200) : n()
                    })
                }
            }), $(e).find(".confirm-tip").on("click", function () {
                $(e).find(".dialog-tip").fadeOut(200), c.val(""), f.val(""), d.val(""), m.val(""), r.val(""), s.val(""), i()
            })
        }
    }
}("#request-proxy");
requestProxy.init()</script>
 </body>
</html>
